apiVersion: apps/v1
kind: Deployment
metadata:
  name: {PROJECT_NAME}
  namespace: {NAMESPACE}
  labels:
    app: {PROJECT_NAME}
spec:
  replicas: 1
  selector:
    matchLabels:
      app: {PROJECT_NAME}
  template:
    metadata:
      labels:
        app: {PROJECT_NAME}
    spec:
      containers:
        - name: {PROJECT_NAME}
          image: {ORIGIN_REPO}/{PROJECT_NAME}/{MODULE_NAME}:{IMAGE_TAG}
          imagePullPolicy: Always
          env:
            - name: TZ
              value: Asia/Shanghai
            - name: BUILD_TAG
              value: {BUILD_TAG}
            - name: NAMESPACE
              value: {NAMESPACE}
          ports:
            - containerPort: 8080
              name: http-port
          resources:
            requests:
              cpu: 200m
              memory: 500Mi
      imagePullSecrets:
        - name: harbor

---
apiVersion: v1
kind: Service
metadata:
  name: {PROJECT_NAME}
  namespace: {NAMESPACE}
  labels:
    app: {PROJECT_NAME}
spec:
  ports:
    - name: port
      port: 80
      protocol: TCP
      targetPort: 8080
  selector:
    app: {PROJECT_NAME}
  type: ClusterIP
